/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-06
 * Time: 18:38
 */
class Shape {
    public void draw() {
        System.out.println("画图形");
    }
}
class Cricle extends Shape{
    @Override
    public void draw() {
        System.out.println("○");
    }
}
class Trang extends Shape {
    @Override
    public void draw() {
        System.out.println("△");
    }
}
class Sqeeq extends Shape {
    @Override
    public void draw() {
        System.out.println("♦");
    }
}
public class Demo01 {
    public static void D (Shape shape) {
        shape.draw();
    }
    public static void main(String[] args) {
        Shape []shape = { new Trang(),new Sqeeq(),new Cricle()};
        for (Shape m:shape) {
            m.draw();
        }
    }
}
